const table1 = document.getElementById('table1');

const  baskets = [{
    count: 100,
    name: "basket",
},{
    count: 101,
    name: "basket",
},{
    count: 102,
    name: "basket",
}]

const fun2=function() {
    table1.innerHTML = "";

    for(let index  = 0; index < baskets.length; index++) {
        const basket = baskets[index];
        const tr =`  <tr>
                        <td>${ index+1 }</td>
                        <td>${ basket.name } </td>
                        <td>${ basket.count} </td>
                     </tr>`
        table1.innerHTML += tr ;
    }
}



window.onload = function() {
    fun2();
}


// const x   = 10;
// console.log(x );

// const  fun1 = function(){

// }